The zero-crossing rate is the rate of sign-changes along a signal, i.e., the rate at which the signal changes from positive to negative or back.[1] This feature has been used heavily in both speech recognition and music information retrieval, being a key feature to classify percussive sounds [2].
ZCR is defined formally as
where is a signal of length and the indicator function is 1 if its argument is true and 0 otherwise.
For monophonic tonal signals, the zero-crossing rate can be used as a primitive pitch detection algorithm.